package net.lainiao.morethread.Chapter1.demo2;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2017/2/27.
 */
public class FileMain {
    public static void main(String[] args) {
        FileClock fileClock=new FileClock();
        Thread thread=new Thread(fileClock);
        thread.start();
        try {
            TimeUnit.SECONDS.sleep(4);
            thread.interrupt();
            TimeUnit.SECONDS.sleep(4);

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        thread.interrupt();
    }
}
